package src

import (
	"github.com/gin-gonic/gin"
	"gitlab.local/DO-module/new-filemanage-module/src/controller"
	"gitlab.local/DO-module/new-filemanage-module/src/core/middleware"
	"gitlab.local/DO-module/new-filemanage-module/src/service/filesystem"
	"gitlab.local/DO-module/new-filemanage-module/src/service/folder"
	"gitlab.local/TerraMaster/tos-modules/core/acl"
	//"gitlab.local/DO-module/new-filemanage-module/src/core/fileoperate"
	"gitlab.local/TerraMaster/tos-modules/fileoperate"
	//"gitlab.local/TerraMaster/tos-modules/middleware"

	"gitlab.local/TerraMaster/tos-modules/database"
	//"gitlab.local/TerraMaster/tos-modules/database"
)

func NewFolderHandle(dbGetter database.DbGetter, shareGetter fileoperate.Getter, aclGetter acl.FolderAttrService) *folder.Folder {
	return folder.NewFolder(dbGetter, shareGetter, aclGetter)
}

func HandleController(
	engine *gin.Engine,
	checker middleware.AuthChecker,
	shareGetter fileoperate.Getter,
	aclGetter acl.FolderAttrService,
	fs *filesystem.FileSystem,
	folders *folder.Folder,
) {
	controller.FileSystemRouter(engine, checker, shareGetter, aclGetter, fs, folders)
}
